<div class="row-fluid">
    {if $smarty.const.debug }
    <form method="GET" action="index.php" name="search_form">
    {else}
    <form method="GET" action="/advanced_search" name="search_form">
    {/if}
        <div class="input-append">
            <input type="text" value="{$keyword}" class="input-xxlarge" name="q" placeholder="输入 片名、艺人、导演" id="search_input_large" data-provide="typeahead" autocomplete="off">
            <button type="submit" class="btn btn-info"><i class="icon-search icon-white"></i> 搜索</button>
            {if $smarty.const.debug }
            <input type="hidden" name="action" value="advanced_search" />
            {/if}
        </div>
        <ul class="inline search-suggestion">
            {foreach from=$searchhistory item=history}
            <li>
                {if $smarty.const.debug }
                <a href="index.php?action=advanced_search&q={$history.keyword}" target="_blank" class="muted">{$history.keyword}</a>
                {else}
                <a href="/advanced_search/q_{$history.keyword}" target="_blank"  class="muted">{$history.keyword}</a>
                {/if}
            </li>
            {/foreach}
        </ul>
    </form>

    <div class="accordion bgwhite" id="filterBlock">
        <div class="accordion-group">
            <div class="accordion-heading">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#filterBlock" href="#collapseOne">
                    <strong>筛选</strong>
                    <span class="pull-right" id="filterStatus">－</span>
                </a>
            </div>
            <div id="collapseOne" class="accordion-body collapse in">
                <div class="accordion-inner">
                    <dl class="dl-horizontal-portfoli">
                        {foreach from=$filters key=type item=filter}
                        <dt>{$filter.name}：</dt>
                        <dd>
                            <ul class="nav nav-pills nav-small" id="filter_ul_{$type}">
                                {foreach from=$filter.value item=item name=detail}
                                {if $smarty.foreach.detail.first}
                                <li class="active"  filter-value="{$item.value}" type="{$type}"><a id="filter_item_{$type}_{$smarty.foreach.detail.index}" href="###">{$item.text}</a></li>
                                {else}
                                <li filter-value="{$item.value}" type="{$type}"><a id="filter_item_{$type}_{$smarty.foreach.detail.index}" href="###">{$item.text}</a></li>
                                {/if}
                                {/foreach}
                            </ul>
                        </dd>
                        {/foreach}
                    </dl>
                </div>
            </div>
        </div>
    </div>
</div>